/**
 * Copyright 2016 JustWayward Team
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.zsgeek.wisdchain.qutu.base.presenter;

/**
 * @version: 1.0
 * @description: MVP基本连接件
 * @date: 2018/9/19
 * @time: 15:30
 */
public interface BaseContract {
    interface BaseView {
        /**
         * 显示错误
         *
         * @param msg Message
         */
        void showError(String msg);

        /**
         * 显示Loading
         *
         * @param msg Message
         */
        void showLoading(String msg);

        /**
         * 隐藏Loading
         */
        void hideLoading();
    }

    /**
     * Presenter实现
     *
     * @param <T> MVP中对应的 View
     */
    interface BasePresenter<T extends BaseView> {
        /**
         * Presenter加载到View
         *
         * @param view view
         */
        void attachView(T view);

        /**
         * Presenter解除
         */
        void detachView();
    }
}